using System;

namespace ProduceBasicData.Api.DTO
{
    /// <summary>
    /// 通知数据传输对象
    /// </summary>
    public class NotificationDto
    {
        /// <summary>
        /// 通知ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 通知标题
        /// </summary>
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 通知内容
        /// </summary>
        public string Content { get; set; } = string.Empty;

        /// <summary>
        /// 通知类型 (1: 工单通知, 2: 报工单通知, 3: 系统通知)
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 通知类型名称
        /// </summary>
        public string TypeName { get; set; } = string.Empty;

        /// <summary>
        /// 工单编号
        /// </summary>
        public string? WorkOrderCode { get; set; }

        /// <summary>
        /// 报工单号
        /// </summary>
        public string? ProductionReportCode { get; set; }

        /// <summary>
        /// 优先级 (1: 低, 2: 中, 3: 高, 4: 紧急)
        /// </summary>
        public int Priority { get; set; }

        /// <summary>
        /// 是否已读
        /// </summary>
        public bool IsRead { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateName { get; set; } = string.Empty;
    }

    /// <summary>
    /// 实时通知DTO
    /// </summary>
    public class RealtimeNotificationDto
    {
        /// <summary>
        /// 通知ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 通知标题
        /// </summary>
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 通知内容
        /// </summary>
        public string Content { get; set; } = string.Empty;

        /// <summary>
        /// 通知类型 (1: 工单通知, 2: 报工单通知, 3: 系统通知)
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 通知类型名称
        /// </summary>
        public string TypeName { get; set; } = string.Empty;

        /// <summary>
        /// 通知标签
        /// </summary>
        public string Tag { get; set; } = string.Empty;

        /// <summary>
        /// 优先级 (1:低, 2:中, 3:高, 4:紧急)
        /// </summary>
        public int Priority { get; set; }

        /// <summary>
        /// 优先级颜色
        /// </summary>
        public string PriorityColor { get; set; } = string.Empty;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 是否显示为弹窗
        /// </summary>
        public bool ShowAsPopup { get; set; } = false;

        /// <summary>
        /// 弹窗持续时间（毫秒）
        /// </summary>
        public int PopupDuration { get; set; } = 5000;

        /// <summary>
        /// 相关工单ID
        /// </summary>
        public int? WorkOrderId { get; set; }

        /// <summary>
        /// 相关工单编号
        /// </summary>
        public string? WorkOrderCode { get; set; }

        /// <summary>
        /// 相关报工单编号
        /// </summary>
        public string? ProductionReportCode { get; set; }
    }
}

